import request from '@/config/axios'

export interface messageType {
  userId?: Number,
  type: Number,
  state:boolean,
  ids:Number[],
}

export interface menus {
  userId?: Number,
  menuIds:Number[],
}

// 获取消息列表
export const getMessageList = (params) => {
  return request.get({ url: '/system/user-message/userMessageInfo', params })
}

// 获取用户消息关联分页/system/user-message/checkAll
export const getPageList = (params) => {
  return request.get({ url: '/system/user-message/page', params })
}

// 信息通知全部已读
export const checkNewsAll = (params) => {
  return request.get({ url: '/system/user-message/checkAll', params })
}

// 信息通知部分已读
export const checkNewsMarK = (data: messageType) => {
  return request.put({ url: '/system/user-message/updateBatch', data })
}
//获取勾选列表
export const getMenuList = () => {
  return request.get({ url: '/system/menu/listNoPar'})
}
//获取快捷窗口数据
export const getShortcutWindow = (id) => {
  return request.get({url:'/system/user-hobby/page?userid='+id})
}
// 勾选快捷
export const checkMenus = (data: menus) => {
  return request.post({ url: '/system/user-hobby/configHobby', data })
}